package com.carl.method;

public class method_01 {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        System.out.println(main);//Thread[main,5,main]
        //输出调用toString方法
//        public String toString() {
//            ThreadGroup group = getThreadGroup();
//            if (group != null) {
//                return "Thread[" + getName() + "," + getPriority() + "," +
//                        group.getName() + "]";
//            } else {
//                return "Thread[" + getName() + "," + getPriority() + "," +
//                        "" + "]";
//            }
//        }
    }
}
